package org.springblade.common.utils.validation.constraints;

import org.springblade.common.utils.validation.DatePatternValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Description 日期格式校验
 * @Author ysq
 * @Date 2023/5/25
 **/
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = DatePatternValidator.class)
public @interface DatePattern {

	String message() default "{javax.validation.constraints.DatePattern.message}";


	String format() default "yyyy-MM-dd";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};
}
